<template>
  <div>
    <h1>纯CSS动画效果</h1>

    <div class="box animate__animated animate__shakeX animate__repeat-2"></div>
    <hr />

    <van-button @click="fn1">Toggle</van-button>

    <div class="box" :class="{ active: isActive }"></div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'

const isActive = ref(false)
function fn1() {
  isActive.value = !isActive.value
}
</script>

<style lang="scss" scoped>
.box {
  width: 100px;
  height: 100px;
  background-color: green;
  transition: all 0.3s ease;
}

.active {
  width: 200px;
  height: 200px;
}
</style>
